package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"hm-fresh-api/api/internal/config"
	"hm-fresh-api/freshrpc/freshrpcclient"
)

type ServiceContext struct {
	Config   config.Config
	FreshRpc freshrpcclient.Freshrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		FreshRpc: freshrpcclient.NewFreshrpc(zrpc.MustNewClient(c.FreshRpc)),
	}
}
